package net.whg.controller;

import net.whg.service.AccountService;
import net.whg.util.JsonData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/api/v1/product/")
public class ProductController {

    @Autowired
    private AccountService accountService;


    @GetMapping("list")
    public JsonData list() {
        return JsonData.buildSuccess(accountService.queryProduct());
    }
}
